package lixiang.neurons;

import java.util.Random;

public class Neurons {

  public static final byte MAX = (byte) 128;
  public static final float EVEN = 0.5f;

  private int count = 100000;
  private Random random = new Random();

  private boolean[] statuses;
  private byte[][] connections;

  Neurons() {
    connections = new byte[count][count];
    statuses = new boolean[count];
    for (int i = 0; i < count; i++) {
      random.nextBytes(connections[i]);
      connections[i][i] = 1;
      for (int j = 0; j < count; j++) {

      }
    }
  }

  public void run() {
    for (int i = 0; i < count; i++) {
      int status = 0;
      for (int j = 0; j < count; j++) {
        if (statuses[j]) {
          status += connections[i][j];
        }
      }
      statuses[i] = status / count > EVEN;
    }
  }

  /**
   * @param args
   */
  public static void main(String[] args) {

  }

}
